<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>老猫系统</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <style>
        .layui-laypage li{float: left;}
        .layui-laypage .active span{background: #009688; color: #fff;}
    </style>
    <script src="/js/jquery.js"></script>
</head>
<body>
{if $Think.session.mem_name !=''}
{$Think.session.nick_name}
<a href="{:url('memQuit')}">退出</a>
{else}
<a href="{:url('memLogin')}">会员登录</a>
<a href="{:url('memReg')}">注册会员</a>
{/if}


<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>商品列表</legend>
</fieldset>

<table class="layui-table">
    <colgroup>
        <col width="50">
        <col width="400">
        <col width="100">
        <col>
    </colgroup>
    <thead>
    <tr>
        <th>标题</th>
        <th>价格</th>
        <th></th>
    </tr>
    </thead>
    <tbody>
    {volist name='list' id='g'}
    <tr>
        <td><a href="{:url('goodsDetail',['id'=>$g['goods_id']])}">{$g.goods_title}</a></td>
        <td>{$g.goods_price}</td>
        <td><a href="{:url('goodsDetail',['id'=>$g['goods_id']])}">购买</a></td>
    </tr>
    {/volist}
    </tbody>
</table>

<ul class="layui-box layui-laypage layui-laypage-default">
    {$list|raw}
</ul>
</body>
</html>